package com.zyicoding.myfactory.service.impl;

import com.zyicoding.myfactory.dao.FactoryorderMapper;
import com.zyicoding.myfactory.pojo.Factoryorder;
import com.zyicoding.myfactory.service.FactoryOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FactoryOrderServiceImpl implements FactoryOrderService {
    @Autowired
    private FactoryorderMapper factoryorderMapper;

    @Override
    public Boolean insertOrder(Factoryorder factoryorder) {
        return factoryorderMapper.insert(factoryorder) > 0;
    }

    @Override
    public List<Factoryorder> selectAllOrder() {
        return factoryorderMapper.selectList(null);
    }
}
